from datetime import date, timedelta
import calendar


def next_month(d):
    return d + timedelta(calendar.monthrange(d.year, d.month)[1])
